package com.yizhang.principle.dependencyinversion;

/**
 * @Author: yi.zhang
 * @CreateTime: 2025-08-21 14:15:44
 * @Description:
 */
public class Tom {

//    public void studyJava() {
//        System.out.println("Tom正在学习Java");
//    }
//
//    public void studyPython() {
//        System.out.println("Tom正在学习Python");
//    }

    private ICourse course;

    public void setCourse(ICourse course) {
        this.course = course;
    }

    public void study() {
        this.course.study();
    }
}
